
<%@page import="beans.ClassBean"%>
<%@page import="java.util.List"%>
<%@page import="dao.MngClass"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <style>
            .fomat input  { width: 500px; height: 200px; }
        </style>

    </head>
    <body>
        <%
            if (request.getAttribute("msg") != null) {
        %>
        <font color="green" > <%= request.getAttribute("msg")%> </font>
        <%
            }
             if (request.getAttribute("error") != null) {
        %>
        <font color="red" > <%= request.getAttribute("error")%> </font>
        <%
            }
        
            HttpSession ss_fb = request.getSession();
            String student_id_fb = ss_fb.getAttribute("acc_id").toString();
            MngClass mngClass = new MngClass();
            List<ClassBean> listClass = mngClass.showClass();
        %>
        <form action="createFeedBack" method="get">   
            <input type="hidden" name="acc_id" value="<%= student_id_fb%>">
            <select name="class_id">
                <option value="" >Select Class</option>
                <%
                    for (ClassBean classBean : listClass) {
                %>
                <option value="<%= classBean.getClass_id()%>"><%= classBean.getClass_name()%></option>
                <%
                    }
                %>
            </select><font color="red" >*</font> <br><br>
            <span style="color: black">  Question :</span> <br><br> <textarea cols="50" rows="5" name="question" maxlength="1000"></textarea><br><br>
            <input type="submit" value="Send question">
        </form>           
            
               
    </body>
</html>
